<form action='<?php echo $this->action ?>'  method= '<?php echo $this->method; ?>'>
    <input name ='id' type='hidden' value='<?php echo $this->id; ?>'>
    <p>Tiêu đề:<br />
        <textarea name='title' cols="80" rows="4"  ><?php echo $this->title; ?></textarea>
    </p>
    <p>Tiêu đề(EN):<br />
    <textarea name='title_en' cols="80" rows="4"    ><?php echo $this->title_en; ?></textarea>
    </p>
    <p>Thumbnail URL<br />
    <textarea cols="80" rows="4" name='thumbnail_url' class='text-input small-input browse' type='text'  ><?php echo $this->thumbnail_url; ?></textarea>
    </p>
     <div>
        <p>Categories</p>
        <select id='cats'>
            <?php
                if(isset($this->cats)){
                    foreach ($this->cats as $item){
                        echo "<option value='".$item['id']."'>".$item['name']."</option>";
                    }
                }
            ?>
            
        </select>
        <a href='#' id='add_new_cat'>Add</a>
    </div>
    <div id="addcats">
        <?php 
            if(isset($this->cat_items)){
                foreach($this->cat_items as $item){
                    echo "<div class='cat_item' id='cat_item_".$item['id_category']."'><input type='hidden' name='cats_item[]' value='".$item['id_category']."'><a href ='#' class='remove_cat'>".$item['category_name']."</a></div>";
                }
            }
        ?>
    </div>
    <div class='clear'></div>
    <p>Mô tả:<br />

    <textarea name='des' cols="80" rows="4" class='text-input small-input' type='text' rows='4'  ><?php echo $this->des; ?></textarea>

    </p>
    <p>Mô tả (EN):<br />

    <textarea name='des_en' cols="80" rows="4" class='text-input small-input' type='text' rows='4'><?php echo $this->des_en; ?></textarea>

    </p>
    <p>Nội dung:<br />

    <textarea name='content' class='ckeditor' type='text'><?php echo $this->content; ?></textarea>

    </p>
    <p>Nội dung (EN):<br />
    <textarea name='content_en' class='ckeditor' type='text'   ><?php echo $this->content_en; ?></textarea>
    </p>
   
    <p>
        <input type='submit' class='button' value='save'>
    </p>
</form>
